<!DOCTYPE html>
<html lang="en">

<head>
    <!-- BEGIN META -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="失败跳转模板">
    <meta name="author" content="ZhiHuaWei">
    <!-- END META -->
    <!-- BEGIN SHORTCUT ICON -->
    <link rel="shortcut icon" href="__STATIC__/img/favicon.ico">
    <!-- END SHORTCUT ICON -->

    <!-- BEGIN STYLESHEET -->
    <link href="__STATIC__/css/bootstrap.min.css" rel="stylesheet">
    <!-- BOOTSTRAP CSS  -->
    <link href="__STATIC__/css/bootstrap-reset.css" rel="stylesheet">
    <!-- BOOTSTRAP CSS  -->
    <link href="__STATIC__/assets/font-awesome/css/font-awesome.css" rel="stylesheet">
    <!-- FONT AWESOME CSS  -->
    <link href="__STATIC__/css/style.css" rel="stylesheet">
    <!-- THEME BASIC CSS  -->
    <link href="__STATIC__/css/style-responsive.css" rel="stylesheet">
    <!-- THEME RESPONSIVE CSS  -->
    <link href="__STATIC__/css/yunadmin.css" rel="stylesheet">
    <!-- YunAdmin CSS -->

    <!--[if lt IE 9]>
    <script src="__STATIC__/js/html5shiv.js"></script>
    <script src="__STATIC__/js/respond.min.js"></script>
    <![endif]-->
    <!-- END STYLESHEET -->
    <title>
        跳转提示 - YunAdmin
    </title>
</head>

<body class="body-404">
<div class="container">
    <!-- BEGIN MAIN CONTENT -->
    <section class="error-wrapper">
        <img src="__STATIC__/img/error.png">
        <h3><?php echo($msg);?></h3>
        <p class="page-404">
            <span>页面自动</span>
            <a class="href" href="<?php echo($url);?>">跳转</a>
            <span>等待时间：</span>
            <span class="second"><?php echo($wait);?></span>
        </p>
    </section>
    <!-- END MAIN CONTENT -->
</div>
</body>
<!-- BEGIN JS -->
<script src="__STATIC__/js/jquery.js"></script>
<!-- BASIC JQUERY LIB. JS -->

<script type="text/javascript">
    $(function() {
        var wait = $(".second").html();
        var href = $(".href").attr('href');
        console.log(href)

        timeOut();
        /**
         * 实现倒计时
         */
        function timeOut() {
            if(wait > 0) {
                setTimeout(function() {
                    $('.second').text(--wait);
                    timeOut();
                }, 1000);
            }else{
                location.href = href;
            }
        }
    });
</script>
<!-- END JS -->

</html>